//
//  ConversationingTableViewCell.swift
//  BusinessIOS
//
//  Created by Rain on 2018/11/20.
//  Copyright © 2018 XingJian Li. All rights reserved.
//

import UIKit

class ConversationingTableViewCell: UITableViewCell {

    var button1:UIButton!
    
    var button2:UIButton!
    
    
    var button3:UIButton!
    
    
    required init?(coder aDecoder: NSCoder) {
        
        super.init(coder: aDecoder)
        
    }
    
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.lauoutUI()
        
    }
    
    func lauoutUI(){
        
        button1 = UIButton(type: UIButtonType.roundedRect)
        
        button1.setTitle("产品分类", for: .normal)
        self.contentView.addSubview(self.button1!)
        
        button2 = UIButton(type: UIButtonType.roundedRect)
        
        button2.setTitle("县市区", for: .normal)
        self.contentView.addSubview(self.button2!)
        
        
        button3 = UIButton(type: UIButtonType.roundedRect)
        
        button3.setTitle("项目进度", for: .normal)
        self.contentView.addSubview(self.button3!)
        
        
    }
    
    override func layoutSubviews() {
        
        super.layoutSubviews()
        
        let aaa = self.frame.size.width/3
        
        self.button1.frame = CGRect(x: 0, y: 0, width: aaa, height: 40)
        
        self.button2.frame = CGRect(x: aaa, y: 0, width: aaa, height: 40)
        self.button3.frame = CGRect(x: aaa * 2, y: 0, width: aaa, height: 40)
        
        
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        
        // Configure the view for the selected state
    }
    
}

